<!--
	作者：1550495493@qq.com
	时间：2019-08-13
	描述：新增角色
-->
<template>
	<div class="HomePage">
		<div class="location">
			<div class="location-text fl">
				<img class="location-img fl" src="../../images/home/i.png" />
				<p class="fr" v-if="operType == 0&&!roleId">新增角色</p>
				<p class="fr" v-if="operType == 0&&roleId">修改角色</p>
				<p class="fr" v-if="operType == 1">查看角色</p>
			</div>
			<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
		</div>
		<div class="IssuedNotice-box">
			<form>
				<div class="search-boxs">
					<label>角色名称：</label>
					<span v-if="operType == 1">{{roleName}}</span>
					<input class="search-box" id="roleName" v-model="roleName" type="text"  v-if="operType == 0"/>
				</div>
				<div class="Role-authorization-box checkbox">
					<p class="Role-authorization-text">角色权限设置</p>
					<div class="menu-authorization  fl">
						<span>菜单权限</span>
						<label v-if="operType == 0"><input type="checkbox" id="checkedAll" @click="checkedAll()"><i>✓</i>全选</label>
						<span class="prompt" v-if="operType == 0">注：勾选后，即表示用户登录后可以看到的菜单</span>
						<div class="checkbox-role">
							<div class="Role-box">
								<ul>
									<li>
										<label><input type="checkbox" id="checkOne" @click="checkOne"><i>✓</i>门户管理</label>
									</li>
									<li>
										<ul>
											<li v-for="(item,index)  in menuOne"><label><input type="checkbox" name="checkOnes" v-model="deleteNewsparameters.data.applicationList" v-bind:value="item.id" ><i>✓</i>{{item.name}}</label></li>
										</ul>
									</li>
								</ul>
								<ul>
									<li><label><input type="checkbox" id="checkTwo" @click="checkTwo"><i>✓</i>基地信息化</label></li>
									<li>
										<ul>
											<li v-for="(item,index)  in menuTwo"><label><input type="checkbox" name="checkTwos" v-model="deleteNewsparameters.data.applicationList" v-bind:value="item.id" ><i>✓</i>{{item.name}}</label></li>
										</ul>
									</li>
								</ul>
								<ul>
									<li><label><input type="checkbox"  id="checkThree" @click="checkThree"><i>✓</i>项目信息化</label></li>
									<li>
										<ul>
											<li v-for="(item,index)  in menuThree"><label><input type="checkbox" name="checkThrees" v-model="deleteNewsparameters.data.applicationList" v-bind:value="item.id" ><i>✓</i>{{item.name}}</label></li>
										</ul>
									</li>
								</ul>
								<ul>
									<li><label><input type="checkbox"  id="checkFour" @click="checkFour"><i>✓</i>教育信息化</label></li>
									<li>
										<ul>
											<li v-for="(item,index)  in menuFour"><label><input type="checkbox" name="checkFours" v-model="deleteNewsparameters.data.applicationList" v-bind:value="item.id" ><i>✓</i>{{item.name}}</label></li>
										</ul>
									</li>
								</ul>
								<ul>
									<li><label><input type="checkbox" id="checkFive" @click="checkFive"><i>✓</i>数据资源库</label></li>
									<li>
										<ul>
											<li v-for="(item,index)  in menuFive"><label><input type="checkbox" name="checkFives" v-model="deleteNewsparameters.data.applicationList" v-bind:value="item.id" ><i>✓</i>{{item.name}}</label></li>
										</ul>
									</li>
								</ul>

								<ul>
									<li><label><input type="checkbox"  id="checkSix" @click="checkSix"><i>✓</i>后台配置</label></li>
									<li>
										<ul>
											<li v-for="(item,index)  in menuSix"><label><input type="checkbox" name="checkSixs"  v-model="deleteNewsparameters.data.applicationList" v-bind:value="item.id" ><i>✓</i>{{item.name}}</label></li>
										</ul>
									</li>
								</ul>

                <ul>
                  <li>   <label><input type="checkbox"  id="checkSeven" @click="checkSeven"><i>✓</i>小程序</label>	</li>

                  <li>
                    <ul>
                  <li v-for="(item,index)  in menuSeven"><label><input type="checkbox" name="checkSevens"  v-model="deleteNewsparameters.data.applicationList" v-bind:value="item.id" ><i>✓</i>{{item.name}}</label></li>

                    </ul>
                  </li>

                </ul>
						  </div>
            </div>
						<!--				<span>操作功能权限</span>
						<label><input type="checkbox"  ><i>✓</i>全选</label>
						<table class="table">
							<thead>
								<tr>
									<th><label><input type="checkbox"  ><i>✓</i>新增</label></th>
									<th><label><input type="checkbox"  ><i>✓</i>查看</label></th>
									<th><label><input type="checkbox"  ><i>✓</i>删除</label></th>
								</tr>
							</thead>
						</table>-->
						<div class="btn-footer">
							<input @click="addRole" v-if="operType == 0 " class="save" type="button" value="确定" />
						<router-link :to="{path:'/roleList',query:{fatherIndex:fatherIndex}}">
							<input class="cancel" type="button" value="取消" v-if="operType == 0"/>
							<input class="save" type="button" value="返回"  v-if="operType == 1"/>
						</router-link>
						</div>

					</div>
				</div>
			</form>
		</div>

	</div>
</template>
<script src="./addRole.js"></script>

<style scoped>
	@import "addRole.css";
</style>
